<?php
if (isset($_POST['op']) && !empty($_POST['op']) ){
    include 'config.php';
    $openid=$_POST['op'];
    if ('null' == $openid){
        exit;
    }
    $cid=$_POST['id'];
    $name=$_POST['name'];
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    $sql="insert into baidu(openid,cid,name,createtime) values('".$openid."','".$cid."','".$name."','".date("Y-m-d H:i:s")."')  ";
    $mysqli->query($sql);
     
    $mysqli->close();
    echo 2;
}

